/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-12-13     zylx         first version
 */

#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__

#include <rtthread.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef BSP_USING_PWM1
#ifndef PWM1_CONFIG
#define PWM1_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM1,         \
       .name                    = "pwm1",       \
       .channel                 = 0             \
    }
#endif /* PWM1_CONFIG */
#endif /* BSP_USING_PWM1 */

#ifdef BSP_USING_PWM2
#ifndef PWM2_CONFIG
#define PWM2_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM2,         \
       .name                    = "pwm2",       \
       .channel                 = 0             \
    }
#endif /* PWM2_CONFIG */
#endif /* BSP_USING_PWM2 */

#ifdef BSP_USING_PWM6
#ifndef PWM6_CONFIG
#define PWM6_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM6,         \
       .name                    = "pwm6",       \
       .channel                 = 0             \
    }
#endif /* PWM6_CONFIG */
#endif /* BSP_USING_PWM6 */

#ifdef BSP_USING_PWM7
#ifndef PWM7_CONFIG
#define PWM7_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM7,         \
       .name                    = "pwm7",       \
       .channel                 = 0             \
    }
#endif /* PWM7_CONFIG */
#endif /* BSP_USING_PWM7 */

#ifdef BSP_USING_PWM15
#ifndef PWM15_CONFIG
#define PWM15_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM15,         \
       .name                    = "pwm15",       \
       .channel                 = 0             \
    }
#endif /* PWM15_CONFIG */
#endif /* BSP_USING_PWM15 */

#ifdef BSP_USING_PWM16
#ifndef PWM16_CONFIG
#define PWM16_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM16,         \
       .name                    = "pwm16",       \
       .channel                 = 0             \
    }
#endif /* PWM16_CONFIG */
#endif /* BSP_USING_PWM16 */



#ifdef __cplusplus
}
#endif

#endif /* __PWM_CONFIG_H__ */
